import request from '@/utils/request';

// 渲染列表
export function showData(query: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/list",
        params: query
    });
}
//新增数据接口
export function addData(data: any) {
    return request({
        method: "post",
        url: "/tienchin/clue",
        data
    });
}
//渠道来源里的数据
export function channelData(data: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/channels",
        params: data
    });
}
//活动信息数据获取
export function activityData(channelId: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/activity/" + channelId,
        params: channelId
    });
}
//修改数据回显接口
export function editData(clueId: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/summary/" + clueId,
        params: clueId
    });
}
//修改线索成功接口
export function editSuccess(data: any) {
    return request({
        method: "put",
        url: "/tienchin/clue",
        data
    });
}
//删除数据接口
export function delSuccess(id: any) {
    return request({
        method: "delete",
        url: "/tienchin/clue/" + id,
        data: id
    });
}

//线索跟进 表格1数据接口
export function tableOne(clueId: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/" + clueId,

    });
}


export function clueData(data: any) {
    return request({
        method: "post",
        url: "/tienchin/clue/follow",
        data
    });
}


export function tabletwo(clueId: any) {
    return request({
        method: "get",
        url: "/tienchin/follow/record/clue/" + clueId,

    });
}
//树形选择器
export function treeSelect() {
    return request({
        method: "get",
        url: "/system/dept/treeselect",

    });
}

export function treeAssign() {
    return request({
        method: "get",
        url: "/tienchin/clue/users/100",

    });
}
export function assignment(data: any) {
    return request({
        method: "post",
        url: "/tienchin/assignment",
        data
    });
}

export function serach(query: any) {
    return request({
        method: "get",
        url: "/tienchin/clue/list/" + query,
        params: query
    });
}

